package com.luban.editor;

import com.luban.entity.User;

import java.beans.PropertyEditor;
import java.beans.PropertyEditorSupport;

/**
 * @Author gary <498982703@qq.com>
 * @Version V1.0.0
 * @Since 1.0
 * @Date 2020/10/27
 *
 * jdk中提供的类转化工具类
 */
public class StringToUserPropertyEditor extends PropertyEditorSupport implements PropertyEditor {

	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		User user = new User();
		user.setName(text);
		this.setValue(user);

	}
}
